package base

import "payme3000/framework/config_center"

type (
	// IController 后台控制器模块
	IController interface {
		IModule
		ISetAppConf
		ISetConfigCenter
		placeholderController()
	}

	// Controller IController基础实现
	Controller struct {
		Module

		AppConf      *AppConf                    // 启动配置, 依赖项
		ConfigCenter *config_center.ConfigCenter // 配置中心
	}
)

func (c *Controller) SetAppConf(appConf *AppConf) {
	c.AppConf = appConf
}

func (c *Controller) SetConfigCenter(configCenter *config_center.ConfigCenter) {
	c.ConfigCenter = configCenter
}

func (*Controller) placeholderController() {}
